package com.example.todolist.mapper;

import com.example.todolist.model.Dynamic;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;

import java.util.Collection;
import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author admin
 * @since 2022-02-25
 */
public interface DynamicMapper extends BaseMapper<Dynamic> {
    /**
     * 查询所有动态
     * @return
     */
    List<Dynamic> selectAllDynamicList();

    /**
     * 根据动态id查询动态详情
     * @param dynamicId
     * @return
     */
    List<Dynamic> selectDynamicById(String dynamicId);


    /**
     * 更新评论总数
     * @param dynamicId
     * @return
     */
    int updateCommentTotalNum(String dynamicId);

    /**
     * 更新删除后评论总数
     * @param dynamicId
     * @return
     */
    int updateCommentDeleteTotalNum(String dynamicId);

}
